import { post, postLoading, uploadFile,get,getnolog } from "./http"

//export const ApitestUrl = 'http://liandong.xxzcloud.com'
//export const ApitestUrl = 'http://admin.sanyuanquan.top'
//export const ApitestUrl = 'https://admin.sczgpy.com'
//export const ApitestUrl = 'http://localhost:8000'
//export const ApitestUrl = 'https://lixihao.mynatapp.cc'
export const ApitestUrl = 'http://admin.sanyuanquan.top'

// export const key = '3JSBZ-UDUCJ-JP4FG-FBPG7-K3XUO-25FQA'
// //文件上传
export const upload = ApitestUrl + '/api/ajax/upload'//上传

export const area = (p: any = {}) => post(ApitestUrl + '/api/ajax/area', p)//省市区三级

export const getParams = (p: any = {}) => post(ApitestUrl + '/api/index/getParams', p)//获取参数配置

export const index = (p: any = {}) => post(ApitestUrl + '/api/goods/indexPage', p)//首页

export const goodsList = (p: any = {}) => post(ApitestUrl + '/api/goods/goodsList', p)//商品列表

export const wxAuth = (p: any = {}) => post(ApitestUrl + '/api/login/wxAuth', p)//微信授权

export const wxMobile = (p: any = {}) => post(ApitestUrl + '/api/login/wxMobile', p)//授权微信手机号

export const h5Auth = (p: any = {}) => get(ApitestUrl + '/api/login/h5Auth', p)//H5网页授权登录

export const h5BindMobile = (p: any = {}) => post(ApitestUrl + '/api/login/h5BindMobile', p)//H5绑定手机号

export const sendSmsCode = (p: any = {}) => post(ApitestUrl + '/api/login/sendSmsCode', p)//发送短信验证码

export const smsLogin = (p: any = {}) => post(ApitestUrl + '/api/login/smsLogin', p)//短信验证码登录

export const goodsInfo = (p: any = {}) => post(ApitestUrl + '/api/goods/goodsInfo', p)//商品信息

export const goodsEvaluate = (p: any = {}) => post(ApitestUrl + '/api/goods/goodsEvaluate', p)//商品评价

export const cartNum = (p: any = {}) => post(ApitestUrl + '/api/goods/cartNum', p)//获取购物车数量

export const saveCart = (p: any = {}) => post(ApitestUrl + '/api/goods/saveCart', p)//加入购物车

export const collectGoods = (p: any = {}) => post(ApitestUrl + '/api/goods/collectGoods', p)//收藏/取消商品

export const userAddress = (p: any = {}) => post(ApitestUrl + '/api/center/userAddress', p)//地址列表

export const getsettlePage = (p: any = {}) => post(ApitestUrl + '/api/goods/settlePage', p)//订单结算页面

export const address_list = (p: any = {}) => post(ApitestUrl + '/api/center/userAddress', p)//地址列表

export const saveAddress = (p: any = {}) => post(ApitestUrl + '/api/center/saveAddress', p)//保存收货地址（新增/修改）

export const delUserAddress = (p: any = {}) => post(ApitestUrl + '/api/center/delUserAddress', p)//删除收货地址

export const userAddressInfo = (p: any = {}) => post(ApitestUrl + '/api/center/userAddressInfo', p)//地址信息

export const subOrder = (p: any = {}) => post(ApitestUrl + '/api/goods/subOrder', p)//提交订单

export const payOrder = (p: any = {}) => post(ApitestUrl + '/api/orders/payOrder', p)//支付订单

export const payOrderWithScore = (p: any = {}) => post(ApitestUrl + '/api/orders/payOrderWithScore', p)//积分支付订单

export const cartList = (p: any = {}) => post(ApitestUrl + '/api/goods/cartList', p)//购物车列表

export const delCart = (p: any = {}) => post(ApitestUrl + '/api/goods/delCart', p)//删除购物车

export const user = (p: any = {}) => post(ApitestUrl + '/api/center/user', p)//用户信息

export const orderList = (p: any = {}) => post(ApitestUrl + '/api/orders/orderList', p)//订单列表

export const orderInfo = (p: any = {}) => post(ApitestUrl + '/api/orders/orderInfo', p)//订单信息

export const cancelOrder = (p: any = {}) => post(ApitestUrl + '/api/orders/cancelOrder', p)//取消订单

export const confirmReceipt = (p: any = {}) => post(ApitestUrl + '/api/orders/confirmReceipt', p)//确认收货

export const applyAfter = (p: any = {}) => post(ApitestUrl + '/api/orders/applyAfter', p)//申请退款/售后

export const subGoodsEvaluate = (p: any = {}) => post(ApitestUrl + '/api/orders/subGoodsEvaluate', p)//提交商品评价

export const afterList = (p: any = {}) => post(ApitestUrl + '/api/orders/afterList', p)//售后列表

export const afterInfo = (p: any = {}) => post(ApitestUrl + '/api/orders/afterInfo', p)//售后单信息

export const afterSendBack = (p: any = {}) => post(ApitestUrl + '/api/orders/afterSendBack', p)//售后寄回商品

export const collectGoodsList = (p: any = {}) => post(ApitestUrl + '/api/goods/collectGoodsList', p)//我的商品收藏列表

export const myEvaluateList = (p: any = {}) => post(ApitestUrl + '/api/orders/myEvaluateList', p)//我的评价列表

export const team = (p: any = {}) => post(ApitestUrl + '/api/center/team', p)//我的团队

export const saveUser = (p: any = {}) => post(ApitestUrl + '/api/center/saveUser', p)//保存用户资料

export const coinLog = (p: any = {}) => post(ApitestUrl + '/api/center/coinLog', p)//用户持币记录

export const moneyLog = (p: any = {}) => post(ApitestUrl + '/api/center/moneyLog', p)//用户余额记录

export const integral = (p: any = {}) => post(ApitestUrl + '/api/center/integral', p)//用户积分记录

export const checkPosGoods = (p: any = {}) => post(ApitestUrl + '/api/goods/checkPosGoods', p)//检查商城中是否有is_pos=1的商品

export const userWithdrawList = (p: any = {}) => post(ApitestUrl + '/api/center/userWithdrawList', p)//提现记录

export const userSubWithdraw = (p: any = {}) => post(ApitestUrl + '/api/center/userSubWithdraw', p)//用户发起提现

export const getChildrenCount = (p: any = {}) => post(ApitestUrl + '/api/center/getChildrenCount', p)//获取10级内的邀请人数总数

export const getUnlimitedQRCode = (p: any = {}) => post(ApitestUrl + '/api/center/getUnlimitedQRCode', p)//生成邀请太阳码

export const shopInfo = (p: any = {}) => post(ApitestUrl + '/api/index/shopInfo', p)//门店信息

export const subShopApply = (p: any = {}) => post(ApitestUrl + '/api/center/subShopApply', p)//提交入驻申请 改 增加字段

export const cutPortType = (p: any = {}) => post(ApitestUrl + '/api/center/cutPortType', p)//用户端/商家端切换

export const getshopInfo = (p: any = {}) => post(ApitestUrl + '/api/shop/shop', p)//门店信息

export const shopmoneyLog = (p: any = {}) => post(ApitestUrl + '/api/shop/moneyLog', p)//商家余额记录

export const shopWithdrawList = (p: any = {}) => post(ApitestUrl + '/api/shop/shopWithdrawList', p)//商家提现记录

export const shopSubWithdraw = (p: any = {}) => post(ApitestUrl + '/api/shop/shopSubWithdraw', p)//商家发起提现

export const saveShop = (p: any = {}) => post(ApitestUrl + '/api/shop/saveShop', p)//修改门店资料

export const indexshopInfo = (p: any = {}) => post(ApitestUrl + '/api/index/shopInfo', p)//门店信息

export const noticelnfo = (p: any = {}) => post(ApitestUrl + '/api/index/noticeInfo', p)//公告信息

export const userChatLog = (p: any = {}) => post(ApitestUrl + '/api/center/userChatLog', p)//获取留言记录-用户

export const sendUserChat = (p: any = {}) => post(ApitestUrl + '/api/center/sendUserChat', p)//发送留言-用户

export const shopChatLog = (p: any = {}) => post(ApitestUrl + '/api/shop/shopChatLog', p)//获取留言记录-商家

export const sendShopChat = (p: any = {}) => post(ApitestUrl + '/api/shop/sendShopChat', p)//发送留言-商家

export const logisticsInfo = (p: any = {}) => post(ApitestUrl + '/api/orders/logisticsInfo', p)//查看物流



//二开
export const shoporderList = (p: any = {}) => post(ApitestUrl + '/api/shop/orderList', p)//商家订单列表

export const shoporderInfo = (p: any = {}) => post(ApitestUrl + '/api/shop/orderInfo', p)//商家订单信息

export const ajaxexpress = (p: any = {}) => post(ApitestUrl + '/api/ajax/express', p)//获取快递公司列表

export const shopdeliver = (p: any = {}) => post(ApitestUrl + '/api/shop/deliver', p)//发货

export const shopgoodsList = (p: any = {}) => post(ApitestUrl + '/api/shop/goodsList', p)//商家商品列表

export const shopsetUpDown = (p: any = {}) => post(ApitestUrl + '/api/shop/setUpDown', p)//商家商品上下架

export const shopdelGoods = (p: any = {}) => post(ApitestUrl + '/api/shop/delGoods', p)//删除商家商品

// 系统相关接口
export const getLinkageRelation = (p: any = {}) => post(ApitestUrl + '/api/linkage/getRelation', p)//获取关系
export const getLinkageTeamStats = (p: any = {}) => post(ApitestUrl + '/api/linkage/getTeamStats', p)//获取团队统计
export const getLinkageUpgradeConditions = (p: any = {}) => post(ApitestUrl + '/api/linkage/getUpgradeConditions', p)//获取升级条件
export const getLinkageIncomeLogs = (p: any = {}) => post(ApitestUrl + '/api/linkage/getIncomeLogs', p)//获取收益记录
export const getLinkageIncomeStats = (p: any = {}) => post(ApitestUrl + '/api/linkage/getIncomeStats', p)//获取收益统计
export const manualUnfreezeIncome = (p: any = {}) => post(ApitestUrl + '/api/linkage/manualUnfreeze', p)//手动解冻收益
export const batchUnfreezeIncome = (p: any = {}) => post(ApitestUrl + '/api/linkage/batchUnfreeze', p)//批量解冻收益
export const inviteLinkageUser = (p: any = {}) => post(ApitestUrl + '/api/linkage/inviteUser', p)//邀请用户
export const getLinkageConfig = (p: any = {}) => post(ApitestUrl + '/api/linkage/getConfig', p)//获取配置
export const getLinkageOrderRelations = (p: any = {}) => post(ApitestUrl + '/api/linkage/getOrderRelations', p)//获取订单关联记录
export const generateInviteQRCode = (p: any = {}) => post(ApitestUrl + '/api/linkage/generateInviteQRCode', p)//生成邀请二维码
export const checkCanInvite = (p: any = {}) => post(ApitestUrl + '/api/linkage/checkCanInvite', p)//检查是否可以邀请
export const getDividendDetails = (p: any = {}) => post(ApitestUrl + '/api/linkage/getDividendDetails', p)//获取分红明细
export const getABAreaProgress = (p: any = {}) => post(ApitestUrl + '/api/linkage/getABAreaProgress', p)//获取AB区业绩进度

// 区域代理相关接口
export const getAgentInfo = (p: any = {}) => post(ApitestUrl + '/api/center/getAgentInfo', p)//获取代理信息（已通过）
export const getApplyStatus = (p: any = {}) => post(ApitestUrl + '/api/center/getApplyStatus', p)//获取申请状态（正在申请）
export const checkRegionConflict = (p: any = {}) => post(ApitestUrl + '/api/center/checkRegionConflict', p)//检查区域冲突
export const submitAgentApply = (p: any = {}) => post(ApitestUrl + '/api/center/submitAgentApply', p)//提交代理申请

// 区域佣金相关接口
export const getRegionCommissionList = (p: any = {}) => post(ApitestUrl + '/api/center/getRegionCommissionList', p)//获取区域佣金列表
export const getRegionCommissionStats = (p: any = {}) => post(ApitestUrl + '/api/center/getRegionCommissionStats', p)//获取区域佣金统计
export const getRegionCommissionFrozenLogs = (p: any = {}) => post(ApitestUrl + '/api/center/getRegionCommissionFrozenLogs', p)//获取区域佣金冻结记录
export const manualUnfreezeRegionCommission = (p: any = {}) => post(ApitestUrl + '/api/center/manualUnfreezeRegionCommission', p)//手动解冻区域佣金
export const batchUnfreezeRegionCommission = (p: any = {}) => post(ApitestUrl + '/api/center/batchUnfreezeRegionCommission', p)//批量解冻区域佣金

// 排行榜相关接口
export const getActivationRanking = (p: any = {}) => post(ApitestUrl + '/api/center/getActivationRanking', p)//获取全国月激活排行榜
export const getUserDirectReferralStats = (p: any = {}) => post(ApitestUrl + '/api/center/getUserDirectReferralStats', p)//获取用户直推下级统计

// 特殊解冻相关接口
export const checkSpecialUnfreeze = (p: any = {}) => post(ApitestUrl + '/api/center/checkSpecialUnfreeze', p)//查询用户特殊解冻标记

// 银行卡相关接口
// 注意：后端字段与路径如下：
// 列表：/api/center/userbank
// 新增/修改：/api/center/savebank（修改多传 id）
// 删除：/api/center/delUserBank
export const bankCardList = (p: any = {}) => post(ApitestUrl + '/api/center/userbank', p)//银行卡列表
export const saveBankCard = (p: any = {}) => post(ApitestUrl + '/api/center/savebank', p)//保存银行卡（新增/修改）
export const delBankCard = (p: any = {}) => post(ApitestUrl + '/api/center/delUserBank', p)//删除银行卡

